import { createRouter, createWebHistory ,createWebHashHistory} from 'vue-router'

import ErrorRoutes from '@/views/errorpages/route'
import LoginRoutes from '@/views/logins/route'
import MainRoutes from '@/views/mains/route'



const routes = [
    {
      path:"",
      redirect:"/login"
    },
    {
      path:'/guide',
      name:"guide",
      component:()=>import('@/views/guide/guide.vue')
    },
    ...ErrorRoutes,
    ...LoginRoutes,
    ...MainRoutes,
    {
      path:"/:pathMatch(.*)",
      redirect:{
        name:"notfound"
      }
    }
]

const router = createRouter({
  history: createWebHashHistory(process.env.BASE_URL),  //hash 
  routes
})

export default router
